package own.stu.jobgib.playown.juc;

import io.netty.util.HashedWheelTimer;

import java.util.concurrent.TimeUnit;

public class HashWheelTimerTest {
    public static void main(String[] args) throws InterruptedException {
        HashedWheelTimer timer = new HashedWheelTimer();
        timer.newTimeout(timeout -> System.out.println("xxx ---- "), 2, TimeUnit.SECONDS);
        timer.newTimeout(timeout -> {
            System.out.println("xxx ---- ");
        }, 1, TimeUnit.SECONDS);

        TimeUnit.MINUTES.sleep(5);
        timer.stop();
    }


}
